<ul id="side-main-navigation" class="nav navbar-nav sub-menu side-main-navigation">
    <li id="All-cat" class='active'><a href="#store" class="dropdown-toggle " data-toggle="dropdown" style="margin-left: 5px">Mindtree Store<span class=""></span></a>
    {{#each categories}}
        <li id="cat-{{id}}" class='color-{{@index}}'>
            <a href="#" class="dropdown-toggle " data-toggle="dropdown" ><span class="color-{{@index}}"></span>{{name}}</a>
             {{#if subCategories.length}}
                <ul id ='sub-cat' class="dropdown-menu">
                    {{#each subCategories}}               
                            <li><a href='#subCatId/{{id}}/subCatName/{{name}}' class="trigger"><span class="">{{name}} </span></a></li>
                    {{/each}}
                </ul>
              {{else}}
                  <!-- keep blank if there is no sub category -->
            {{/if}}
        </li>   
    {{/each}}
</ul>
